﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="using:Dispatchr.Client.Styles"
                    xmlns:converters="using:Dispatchr.Client.Converters"
                    xmlns:foundation="using:Windows.Foundation">
    <x:Double x:Key="HubHeroWidth">818</x:Double>
    <x:Double x:Key="HubHeroHeight">600</x:Double>

    <x:Double x:Key="HubItemWidth">414</x:Double>
    <x:Double x:Key="HubItemHeight">110</x:Double>
    <foundation:Size x:Key="DetailSize">200,220</foundation:Size>


    <converters:DateTimeConverter x:Key="DateTimeConverter" />

    <DataTemplate x:Key="HubHeroTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <Grid Grid.Column="0"
                  Width="120"
                  Height="120">
                <Rectangle Fill="Black"
                           Opacity=".6" />
                <TextBlock HorizontalAlignment="Center"
                           VerticalAlignment="Center"
                           FontSize="50"
                           Text="+"
                           TextAlignment="Center"
                           TextLineBounds="Tight" />
                <Image Grid.Column="0"
                       Source="{Binding Appointment.Map}" />

            </Grid>

            <Grid Grid.Column="1"
                  HorizontalAlignment="Stretch"
                  Margin="20,0,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0"
                           HorizontalAlignment="Left"
                           FontSize="26"
                           FontWeight="Light"
                           Text="{Binding Appointment.Date, ConverterParameter=dddd\, MMM dd, Converter={StaticResource DateTimeConverter}}"
                           TextAlignment="Left"
                           TextWrapping="Wrap" />
                <TextBlock Grid.Row="1"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Bottom"
                           FontSize="30"
                           Text="{Binding Appointment.Date, ConverterParameter=hh:mm tt, Converter={StaticResource DateTimeConverter}}"
                           TextAlignment="Left"
                           TextWrapping="Wrap" />
                <TextBlock Grid.Row="2"
                           FontSize="20"
                           FontWeight="Light"
                           Text="{Binding Appointment.Location}"
                           VerticalAlignment="Top"
                           TextWrapping="WrapWholeWords" />
            </Grid>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="HubNormalTemplate">
        <Grid Background="Transparent"
              Margin="0,10,0,10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0"
                  Width="90"
                  Height="90">
                <Rectangle Fill="Black"
                           Opacity=".6" />
                <TextBlock HorizontalAlignment="Center"
                           VerticalAlignment="Center"
                           FontSize="50"
                           Text="+"
                           TextAlignment="Center"
                           TextLineBounds="Tight" />
                <Image Source="{Binding Appointment.Map}"
                       Stretch="UniformToFill" />
            </Grid>
            <Grid Grid.Column="1"
                  Margin="30,5,20,5"
                  HorizontalAlignment="Stretch">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0"
                           HorizontalAlignment="Left"
                           FontSize="32"
                           FontWeight="SemiBold"
                           Text="{Binding Appointment.Date, ConverterParameter=hh:mm tt, Converter={StaticResource DateTimeConverter}}"
                           TextAlignment="Left"
                           TextWrapping="Wrap" />
                <TextBlock Grid.Row="1"
                           FontSize="20"
                           FontWeight="Light"
                           Text="{Binding Appointment.Location}"
                           TextWrapping="WrapWholeWords" />
            </Grid>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="AppointmentTemplate">
        <Grid Background="Transparent"
              Margin="0,10,0,10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0"
                  Width="60"
                  Height="60">
                <Rectangle Fill="Black"
                           Opacity=".6" />
                <TextBlock HorizontalAlignment="Center"
                           VerticalAlignment="Center"
                           FontSize="32"
                           Text="+"
                           TextAlignment="Center"
                           TextLineBounds="Tight" />
                <Image Source="{Binding Appointment.Map}"
                       Stretch="UniformToFill" />
            </Grid>
            <Grid Grid.Column="1"
                  Margin="30,5,20,5"
                  HorizontalAlignment="Stretch">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0"
                           HorizontalAlignment="Left"
                           FontSize="20"
                           FontWeight="SemiBold"
                           Text="{Binding Appointment.Date, ConverterParameter=hh:mm tt, Converter={StaticResource DateTimeConverter}}"
                           TextAlignment="Left"
                           TextWrapping="Wrap" />
                <TextBlock Grid.Row="1"
                           FontSize="14"
                           FontWeight="Light"
                           Text="{Binding Appointment.Location}"
                           TextWrapping="WrapWholeWords" />
            </Grid>
        </Grid>
    </DataTemplate>

    <ImageBrush x:Key="AppBackground"
                ImageSource="/Assets/Backgrounds/solarizr-bg-with-overlay_1356x904.png"
                Stretch="UniformToFill" />

</ResourceDictionary>
